package cn.wx.remote;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;


/**
 * 第三方接口：请求百度天气
 */
@FeignClient(value = "BaiduWeatherRemoteClient", url = "${baidu.server}")
public interface BaiduWeatherRemoteClient {


    /**
     * 查询每日天气
     * @param baiduWeatherParam
     * @return
     */
    @GetMapping(value = "/weather/v1/",
            consumes = { MediaType.APPLICATION_JSON_VALUE },
            produces = { MediaType.APPLICATION_JSON_VALUE }
    )
    String queryWeather(@SpringQueryMap BaiduWeatherParam baiduWeatherParam);
}